knitr::opts_chunk$set(echo = TRUE)
This package is designed to compare protein spectral count data derived from an experiment comparing two samples.
spectralanalysis packageThis package requires the qvalue package in Bioconductor. The following commands check for the presence of the Bioconductor installation facility
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
Now install the qvalue package from Bioconductor:
BiocManager::install("qvalue")
Since the spectralanalysis package is on github, before installing it we must install the devtools package from CRAN, by typing
install.packages("devtools")
Then install the spectralanalysis package from the github repository by typing
devtools::install_github("mooredf22/spectralanalysis")
We also will need the Hmisc package:
install.packages("Hmisc")
Now attach the spectralanalyze, qvalue, and Hmisc packages:
library(spectralanalysis) library(qvalue) library(Hmisc)
We may inspect the data set spectralData_ClN1_late as follows:
str(spectralData_CLN1_late)
We may examine the names as follows:
names(spectralData_CLN1_late)
Now we may extract the values for animal 1 as follows:
clnWt1 <- spectralData_CLN1_late[,c(1,2,8)] head(clnWt1) proteincount <- clnWt1
Give a list of odds (and odds ratios) to test as null hypotheses:
odds.list <- c(1,2)
Now compare the cln and wt groups:
result <- proteinCountCompare(proteincount)
The function returns a list of data frames: 1. Wilson 95% confidence intervals 2. P-values for each protein based on a binomial comparison 3. Q-values for these 4. P-values for each protein based on Fisher's exact test 5. Q-values for these
names(result) head(result$wilson.AB) head(result$pval.AB) head(result$qval.AB) head(result$fisher.odds) head(result$pval.AB.f) head(result$qval.AB.f)
protein.mult.pval <- data.frame(proteincount," ",result$wilson.AB," ",result$pval.AB," ", result$qval.AB," ",result$fisher.odds," ", result$pval.AB.f," ",result$qval.AB.f) head(protein.mult.pval)
We may write out the results to an external directory as follows:
setwd("c:\\temp")
write.csv(protein.mult.pval,file="Cln1Wt1.csv", row.names=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.